<%= stylesheet_link_tag 'main/main.css' %>
<%= javascript_include_tag 'main/main.js' %>
<%= javascript_include_tag 'note_info/note_info.js' %>
<%= stylesheet_link_tag 'note_info/note_info.css' %>

<%= render 'main/head' %>
<body class="main_background">
<div style="text-align: center;color: #ffffff;">
  <div class="currency_frame" style="padding-bottom: 35px">
    <div class="note_fram">
      <div class="head_info_fram" onclick="jump_page('/main/get_user_info?user_name=<%= @note_user_info.name %>')">
        <img src="<%= @note_user_info.user_image %>" class="head_image">
        <div  class="" onclick="">
          <span class="left"><%= @note_user_info.name %></span>
          <span class="left"><%= @note_user_info.sex %></span>
          <br/>
        </div>
        <div>
          <br/>
          <span class="left"><%= @get_note.created_at.to_s.slice(5,11) %></span>
        </div>
      </div>
      <div class="" >
        <p class="note_content"><%= @get_note.content %></p>
        <img class="note_image " src="<%= @get_note.note_photo %>">
      </div>

      <div class="comment_main_fram">
        <% @get_comment.each_with_index do |comment,index| %>
            <div class="show_comment_fram">
              <div class="head_info_fram" style="border: 0;">
                <img src="<%= comment[1].user_image %>" class="comment_head_image">
                <div  class="" onclick="">
                  <span class="left margin-left-5"><%= comment[1].name %></span>
                  <span class="left margin-left-5"><%= comment[1].sex %></span>
                  <br/>
                </div>
                <div>
                  <br/>
                  <span class="left margin-left-5"><%= comment[0].created_at.to_s.slice(5,11) %></span>
                  <span style="float: left;margin-left: 15px"><%= index+1 %>楼</span>
                </div>
                <div style="float: right;margin-right: 20px">
                  <span  onclick="get_comment_fram(<%= index %>)">回复</span>
                </div>
              </div>
              <div class="comment_content margin-left-20">
                <span><%= comment[0].floor_number.to_i > 0 ? '回复'+ comment[0].floor_number + '楼:' : '' %></span>
                <span style="width: 300px;"><%= comment[0].comment_content %></span>
              </div>
            </div>
            <div  onfocusout="change()" style="position: fixed;bottom: 5px;margin: 0;height: 50px;" id="comment_input_fram<%= index %>" class="comment_input_fram">
              <textarea  style="width: 430px;" id="comment<%= index %>" rows="3" placeholder="回复<%= index+1 %>楼："></textarea>
              <button onclick="get_comment_(<%= @get_note.id %>,<%= index %>,'<%= comment[1].name %>')">回复</button>
            </div>
        <% end %>
      </div>
    </div>
    <div  id="change_comment_fram" style="text-align: left" >
      <button id="comment_button" class="confirm_button" style="background-color: #5f616d" onclick="show_comment_fram(<%= @get_note.id %>)">回复</button>
      <div  onfocusout="change()" style="position: fixed;bottom: 5px;margin: 0;height: 50px;" id="comment_input_fram" class="comment_input_fram">
        <textarea  style="width: 430px;" id="comment-1" rows="3" placeholder="回复帖子："></textarea>
        <button onclick="get_comment_(<%= @get_note.id %>,-1,'<%= @note_user_info.name %>')">回复</button>
      </div>
    </div>

  </div>
</div>
</body>



